﻿<%@ Page Language="C#"  EnableEventValidation = "false" AutoEventWireup="true" CodeBehind="eCardSearch.aspx.cs" Inherits="Customer_Profile.eCard.eCardSearch" %>
<%@ Register assembly="DevExpress.Web.ASPxGridView.v9.3, Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v9.3, Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.ASPxGridView.v9.3.Export, Version=9.3.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView.Export" tagprefix="dx" %>
<%@ Register Src="../mainTop.ascx" TagName="mainTop" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Customer List</title>
    <meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR" />
    <meta content="C#" name="CODE_LANGUAGE" />
    <meta content="JavaScript" name="vs_defaultClientScript" />
    <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="/css/style.css" type="text/css" rel="stylesheet" />
    <script language="javascript" type="text/javascript" src="../Js/common.js"></script>
    <script language="javascript" type="text/javascript" src="/js/CalPopUp.js"></script>
    <script language="javascript" type="text/javascript" src="/js/combox.js"></script>
    <script language="javascript"  type="text/javascript">
        function checkForm() {
            var start_date = document.getElementById("txtcreatedatebegin").value;
            var end_date = document.getElementById("txtcreatedateend").value;

            if (trim(start_date) != '' && trim(end_date) != '') {
                if (!strDateTime(start_date)) {
                    alert('起始日期格式不准确');
                    return false;
                }
                if (!strDateTime(end_date)) {
                    alert('结束日期格式不准确');
                    return false;
                }
            }
            return true;
        }
    </script>
</head>
<body bgcolor="#ffffff" leftmargin="0" topmargin="0">
    <form id="Form1" name="form1" action="" method="post" runat="server">
        <table height="100%" cellspacing="0" cellpadding="0" width="100%" border="0">
            <tr>
                <td width="1" background="/images/dot_vline.gif">
                    <img height="1" src="/images/spacer.gif" width="1"></td>
                <td valign="top" width="15">
                    <img height="1" src="/images/spacer.gif" width="15"></td>
                <td valign="top">
                    <table cellspacing="0" cellpadding="0" width="100%" border="0">
                        <tr>
                            <td style="height: 23px">
                                <uc1:mainTop ID="MainTop1" runat="server" />
                                <span class="navi-blu"><span class="navi-blk">个人旅行卡管理 &gt; 交易管理 &gt; 交易查询-总部</span>
                                </span>
                            </td>
                        </tr>
                        <tr>
                            <td background="/images/dot_hline.gif">
                                <img height="1" src="/images/spacer.gif" width="1"></td>
                        </tr>
                    </table>
                    <table style="position: relative; top: 6px" cellspacing="0" cellpadding="0" width="100%"
                        border="0">
                        <tr>
                            <td>
                                <img height="6" src="/images/corner_lft1.gif" width="6"></td>
                            <td>
                                <div align="right">
                                    <img height="6" src="/images/corner_rgt1.gif" width="6"></div>
                            </td>
                        </tr>
                    </table>
                    <table cellspacing="1" cellpadding="4" width="100%" bgcolor="#c8c8c8" border="0">
                        <tr bgcolor="#e9e9e9">
                            <td>
                                <table cellspacing="0" cellpadding="0" width="100%" border="0">
                                    <tr>
                                        <td width="95" style="height: 18px">
                                            <img height="9" hspace="5" src="/images/arw_gry_rgt.gif" width="9" align="absMiddle">卡号：</td>
                                        <td>                                            
                                            <asp:TextBox ID="txtCardNo" runat="server" CssClass="input2" size="20"></asp:TextBox>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                            <td>
                            <table cellspacing="0" cellpadding="0" width="100%" border="0">
                                    <tr>
                                        <td width="100">
                                            <img height="9" hspace="5" src="/images/arw_gry_rgt.gif" width="9" align="absMiddle">购买产品：</td>
                                        <td>
                                          <%--  <asp:DropDownList ID="dropProd"  runat="server" >
                                            </asp:DropDownList>--%>
                                            <dx:ASPxDropDownEdit ClientInstanceName="checkComboBox" ID="ASPxDropDownEdit1" 
                                                SkinID="CheckComboBox" Width="180px" runat="server" EnableAnimation="False" ReadOnly="True">
                                                <DropDownWindowTemplate>
                                                    <dx:ASPxListBox Width="100%" Height="300px" ID="listBox" ClientInstanceName="checkListBox" SelectionMode="CheckColumn" runat="server"  SkinID="CheckComboBoxListBox">
                                                    <ClientSideEvents SelectedIndexChanged="OnListBoxSelectionChanged" />
                                                    </dx:ASPxListBox>
                                                    <table style="width:100%"><tr><td align="right">
                                                        <dx:ASPxButton ID="ASPxButton1" AutoPostBack="False" runat="server" Text="Close">
                                                            <ClientSideEvents Click="function(s, e){ checkComboBox.HideDropDown(); }"/>
                                                        </dx:ASPxButton>
                                                    </td></tr></table>
                                                </DropDownWindowTemplate>
                                                <ClientSideEvents TextChanged="SynchronizeListBoxValues" DropDown="SynchronizeListBoxValues" />
                                           </dx:ASPxDropDownEdit>
                                        </td>
                                        
                                    </tr>
                                </table>                                
                            </td>
                            <td>
                            <table cellspacing="0" cellpadding="0" width="100%" border="0">
                                    <tr>
                                        <td width="100">
                                            <img height="9" hspace="5" src="/images/arw_gry_rgt.gif" width="9" align="absMiddle">余额区间：</td>
                                        <td>
                                            从<asp:TextBox ID="txtStartBalance" runat="server" CssClass="input2" size="10"></asp:TextBox>
                                            到<asp:TextBox ID="txtEndBalance" runat="server" CssClass="input2" size="10"></asp:TextBox>
                                        </td>
                                        
                                    </tr>
                                </table>                                
                            </td>
                            <td>
                                <table cellspacing="0" cellpadding="0" width="100%" border="0">
                                    <tr>
                                        <td style="height: 18px">
                                            <img height="9" hspace="5" src="/images/arw_gry_rgt.gif" width="9" align="absMiddle">客户姓名：</td>
                                        <td>
                                            <asp:TextBox ID="txtCpartyName" runat="server" CssClass="input2" size="20"></asp:TextBox>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr bgcolor="#e9e9e9">
                            <td>
                                <table cellspacing="0" cellpadding="0" width="100%" border="0">
                                    <tr>
                                        <td width="100">
                                            <img height="9" hspace="5" src="/images/arw_gry_rgt.gif" width="9" align="absMiddle">地区：</td>
                                        <td>
                                            <asp:DropDownList ID="dropEntity" runat="server" Width="135">
                                            </asp:DropDownList>
                                        </td>                                        
                                    </tr>
                                </table>
                            </td>
                            <td>
                                <table cellspacing="0" cellpadding="0" width="100%" border="0">
                                    <tr>
                                        <td  width="100">
                                            <img height="9" hspace="5" src="/images/arw_gry_rgt.gif" width="9" align="absMiddle">日期类型：</td>
                                            <td>
                                            <asp:DropDownList width="80" ID="dropDateType"  runat="server">
                                                <asp:ListItem Text="录入日期" Value="input_date" Selected></asp:ListItem>
                                                <asp:ListItem Text="提交日期" Value="submit_date"></asp:ListItem>
                                                <asp:ListItem Text="审核日期" Value="review_date"></asp:ListItem>
                                                <asp:ListItem Text="起息日期" Value="value_date"></asp:ListItem>
                                                <asp:ListItem Text="到期日期" Value="due_date"></asp:ListItem>
                                            </asp:DropDownList>
                                         </td>                                        
                                    </tr>
                                </table>
                            </td>
                            <td>
                                <table cellspacing="0" cellpadding="0" width="100%" border="0">
                                    <tr>      
                                        <td  width="100">
                                            <img height="9" hspace="5" src="/images/arw_gry_rgt.gif" width="9" align="absMiddle">日期区间：</td>
                                        <td>                                  
                                        <td>
                                            从
                                            <asp:TextBox ID="txtcreatedatebegin" runat="server" CssClass="input2" Width="80px"></asp:TextBox>
                                            <img style="cursor: hand" onclick="JavaScript:calPopForCMon(txtcreatedatebegin, 'ss');"
                                                height="14" src="/images/dot_date.gif" width="16" align="absMiddle">
                                            到
                                            <asp:TextBox ID="txtcreatedateend" runat="server" CssClass="input2" Width="80px"></asp:TextBox>
                                            <img style="cursor: hand" onclick="JavaScript:calPopForCMon(txtcreatedateend, 'ss');"
                                                height="14" src="/images/dot_date.gif" width="16" align="absMiddle">
                                        </td>
                                    </tr>
                                </table>
                            </td>
                            <td>
                                <div align="left">                                                
                                    <img height="9" hspace="5" src="/images/arw_gry_rgt.gif" width="9" align="absMiddle">状态：
                                    <asp:DropDownList ID="dropDealStatus" runat="server" > </asp:DropDownList>
                                    &nbsp;&nbsp;&nbsp;&nbsp;
                                    <asp:Button ID="btnSearch" runat="server" Text="搜索" class="button" onclientclick="return checkForm()" onclick="btnSearch_Click" />&nbsp;
                                    <asp:Button ID="btnExport" runat="server" Text="导出" class="button" 
                                        onclick="btnExport_Click" />
                                </div>
                            </td>
                        </tr>
                    </table>
                    <table style="position: relative; top: -6px" cellspacing="0" cellpadding="0" width="100%"
                        border="0">
                        <tr>
                            <td>
                                <img height="6" src="/images/corner_lft2.gif" width="6"></td>
                            <td>
                                <div align="right">
                                    <img height="6" src="/images/corner_rgt2.gif" width="6"></div>
                            </td>
                        </tr>
                    </table>
                    <table bordercolor="#c2d2e2" cellspacing="0" cellpadding="2" width="100%" border="1">
                        <tr>
                            <td>
                                <table cellspacing="0" cellpadding="0" width="100%" border="0">
                                    <tr>
                                        <td bgcolor="#1765a7">
                                            <img height="11" src="/images/pic_results.gif" width="61"></td>
                                    </tr>
                                </table>
                                <table cellspacing="0" cellpadding="0" width="100%" border="0">
                                    <tr>
                                        <td class="bglist" width="5%">交易号</td>
                                        <td class="bglist"><img height="16" src="/images/dot_vline2.gif" width="1"></td>
                                        <td class="bglist" width="10%">卡号</td>
                                        <td class="bglist"><img height="16" src="/images/dot_vline2.gif" width="1"></td>
                                        <td class="bglist" width="5%">客户姓名</td>
                                        <td class="bglist"><img height="16" src="/images/dot_vline2.gif" width="1"></td>
                                        <td class="bglist" width="11%">产品名称</td>
                                        <td class="bglist"><img height="16" src="/images/dot_vline2.gif" width="1"></td>
                                        <td class="bglist" width="8%">状态</td>
                                        <td class="bglist"><img height="16" src="/images/dot_vline2.gif" width="1"></td>
                                        <td class="bglist" width="5%">折扣率</td>
                                        <td class="bglist"><img height="16" src="/images/dot_vline2.gif" width="1"></td>
                                        <td class="bglist" width="7%">实收金额</td>
                                        <td class="bglist"><img height="16" src="/images/dot_vline2.gif" width="1"></td>
                                        <td class="bglist" width="7%">到期金额</td>
                                        <td class="bglist"><img height="16" src="/images/dot_vline2.gif" width="1"></td>
                                        <td class="bglist" width="7%">提交日</td>
                                        <td class="bglist"><img height="16" src="/images/dot_vline2.gif" width="1"></td>
                                        <td class="bglist" width="7%">审核日</td>
                                        <td class="bglist"><img height="16" src="/images/dot_vline2.gif" width="1"></td>
                                        <td class="bglist" width="7%">起息日</td>
                                        <td class="bglist"><img height="16" src="/images/dot_vline2.gif" width="1"></td>
                                        <td class="bglist" width="7%">到期日</td>
                                        <td class="bglist"><img height="16" src="/images/dot_vline2.gif" width="1"></td>
                                        <td class="bglist" width="3%">代理</td>
                                        <td class="bglist"><img height="16" src="/images/dot_vline2.gif" width="1"></td>                                   
                                        <td class="bglist" width="3%">展期</td>
                                        <td class="bglist"><img height="16" src="/images/dot_vline2.gif" width="1"></td>
                                        <td class="bglist" width="3%">退卡</td>
                                        <td class="bglist"><img height="16" src="/images/dot_vline2.gif" width="1"></td>
                                        <td class="bglist" width="5%">地区</td>                                        
                                    </tr>
                                    <tr>
                                        <td colspan="31">
                                            <font face="宋体">
                                                <div style="overflow: auto; width: 100%; height: 100%">
                                                    <asp:GridView ID="GvData" runat="server" ShowHeader="false" AutoGenerateColumns="False"
                                                        BorderWidth="0px" Width="100%" HorizontalAlign="Center" 
                                                        Font-Size="Smaller" DataKeyNames="deal_no"
                                                        OnRowDataBound="GvData_RowDataBound" AllowPaging="True" OnPageIndexChanging="GvData_PageIndexChanging"
                                                        PageSize="20">
                                                        <HeaderStyle HorizontalAlign="Center" BorderStyle="Groove" BackColor="#C0C0FF" />
                                                        <RowStyle HorizontalAlign="Center" CssClass="bglist-2" />
                                                        <Columns>
                                                            <asp:BoundField DataField="deal_no" HeaderText="交易号">
                                                                <ItemStyle Width="5%" />
                                                            </asp:BoundField>
                                                            <asp:TemplateField HeaderText="status" ItemStyle-Width="10%">
                                                                <ItemTemplate>
                                                                    <asp:LinkButton ID="LinkButton1" Text='<%#Eval("card_No") %>' runat="server"></asp:LinkButton>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:BoundField DataField="cparty_name" HeaderText="客户姓名">
                                                                <ItemStyle Width="5%" />
                                                            </asp:BoundField>
                                                            <asp:BoundField DataField="procduct_name" HeaderText="产品名称">
                                                                <ItemStyle Width="11%" />
                                                            </asp:BoundField>
                                                            <asp:BoundField DataField="dealstatus" HeaderText="状态">
                                                                <ItemStyle Width="8%" />
                                                            </asp:BoundField>
                                                            <asp:BoundField DataField="real_discount" HeaderText="销售折扣">
                                                                <ItemStyle Width="5%" />
                                                            </asp:BoundField>                                                            
                                                            <asp:BoundField DataField="initial_amount" HeaderText="实收金额">
                                                                <ItemStyle Width="7%" />
                                                            </asp:BoundField>
                                                            <asp:BoundField DataField="due_amount" HeaderText="入卡金额">
                                                                <ItemStyle Width="7%" />
                                                            </asp:BoundField>
                                                            <asp:BoundField DataField="submit_date" HeaderText="提交日"  DataFormatString="{0:yyyy-MM-dd}">
                                                                <ItemStyle Width="7%" />
                                                            </asp:BoundField>
                                                            <asp:BoundField DataField="review_date" HeaderText="审核日"  DataFormatString="{0:yyyy-MM-dd}">
                                                                <ItemStyle Width="7%" />
                                                            </asp:BoundField>
                                                            <asp:BoundField DataField="value_date" HeaderText="起息日"  DataFormatString="{0:yyyy-MM-dd}">
                                                                <ItemStyle Width="7%" />
                                                            </asp:BoundField>
                                                            <asp:BoundField DataField="due_date" HeaderText="到期日"  DataFormatString="{0:yyyy-MM-dd}">
                                                                <ItemStyle Width="7%" />
                                                            </asp:BoundField>
                                                             <asp:BoundField DataField="if_agentsale" HeaderText="代理">
                                                                <ItemStyle Width="3%" />
                                                            </asp:BoundField>
                                                            <asp:BoundField DataField="if_isExtension" HeaderText="展期">
                                                                <ItemStyle Width="3%" />
                                                            </asp:BoundField>
                                                            <asp:BoundField DataField="if_returncard" HeaderText="退卡">
                                                                <ItemStyle Width="3%" />
                                                            </asp:BoundField>
                                                            <asp:BoundField DataField="entity" HeaderText="地区">
                                                                <ItemStyle Width="5%" />
                                                            </asp:BoundField>                                                                                    
                                                        </Columns>
                                                    </asp:GridView>
                    
                                                </div>
                                            </font>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                    <table cellspacing="0" cellpadding="0" width="100%" border="0">
                        <tr>
                            <td>
                                <img height="3" src="/images/spacer.gif" width="1"></td>
                        </tr>
                    </table>
                    <br>
                </td>
                <td valign="top" width="10">
                    <img height="1" alt="" src="/images/spacer.gif" width="10"></td>
            </tr>
        </table>
    </form>
</body>
</html>